Skip to content

Automatic file backup#99

Open
stellaappiok wants to merge 4 commits into
Grow-with-Open-Source:mainfrom
stellaappiok:automatic_file_backup
Open

Automatic file backup#99
stellaappiok wants to merge 4 commits into
Grow-with-Open-Source:mainfrom
stellaappiok:automatic_file_backup

Conversation

@stellaappiok

Copy link
Copy Markdown
Contributor

Add scheduled daily folder backup script
This adds a small standalone script that automates daily backups of a folder using the schedule library.

What it does

  • Runs continuously and copies a source folder to a destination directory once a day at a configurable time
  • Names each backup by date (e.g. 2026-07-16) so each day's snapshot is kept separately
  • Gracefully handles the case where a backup for the current day already exists, instead of throwing an unhandled error

Why
Useful as a lightweight, dependency-light way to keep periodic snapshots of a folder (configs, project files, etc.) without needing a full backup tool or cron setup on systems where that's inconvenient.

How to test

  1. pip install schedule
  2. Set source_dir and destination_dir at the top of the script
  3. Temporarily change the scheduled time to a few minutes from now
  4. Run the script and confirm a dated folder appears in destination_dir with the source contents copied

Notes / follow-ups

  • No backup rotation/cleanup yet — old backups accumulate over time
  • Only supports one source folder per run
  • Included a README documenting usage, configuration, and possible future improvements (rotation, compression, CLI config, logging)

@github-actions

Copy link
Copy Markdown

👋 @stellaappiok
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant